Skip to content

CHALLENGER njit serial numpy dot #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

seanlaw
Copy link
Contributor

@seanlaw seanlaw commented Feb 27, 2025

Tested the njit dot function from numpy:

import numpy as np
from numba import njit


def setup(Q, T):
    sliding_dot_product(Q, T)
    return


@njit(fastmath=True)
def sliding_dot_product(Q, T):
    m = Q.shape[0]
    l = T.shape[0] - m + 1
    out = np.empty(l)
    for i in range(l):
        out[i] = np.dot(Q, T[i : i + m])

    return out

Using ./test.py -noheader -pmin 6 -pmax 23 -pdiff 6 challenger >> timing.csv.

download-29

@seanlaw seanlaw changed the title CHALLENGER njit numpy dot CHALLENGER njit serial numpy dot Feb 27, 2025
@seanlaw
Copy link
Contributor Author

seanlaw commented Feb 27, 2025

The results are comparable to the original njit and, possibly, "better" when len(Q) == len(T) and len(T) <= 2^14.

I would consider comparing the lower p values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant